import http from '../utils/http'
let baseUrl = 'http://music.cpengx.cn'

//说明 : 调用此接口 , 可获取 banner( 轮播图 ) 数据
export async function getBanner(params = {}) {
    return http.get(`${baseUrl}/banner`, params)
}

//说明 : 调用此接口 , 可获取推荐歌单
export async function personalized(params = {}) {
    return http.get(`${baseUrl}/personalized`, params);
}

//说明 : 歌单能看到歌单名字, 但看不到具体歌单内容 , 调用此接口 , 传入歌单 id
export function playlistDetail(params = {}) {
    return http.get(`${baseUrl}/playlist/detail`, params);
}

//获取歌词
export function getLyric(params = {}) {
    return http.get(`${baseUrl}/lyric`, params);
}

//搜索
export function goSearch(params = {}) {
    return http.get(`${baseUrl}/search`, params);
}

//手机登录
export function loginCellphone(params = {}) {
    return http.get(`${baseUrl}/login/cellphone`, params);
}

//获取用户详情
export function getUserDetail(params = {}) {
    return http.get(`${baseUrl}/user/detail`, params);
}
